From f526b95587c92c411d42e8bc3d6881d97a341db5 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 1 Jun 1993 03:37:28 +0000 Subject: [PATCH] (Frem): Fix result sign properly. --- src/data.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data.c b/src/data.c index c5564158984..bedece43285 100644 --- a/src/data.c +++ b/src/data.c @@ -1762,7 +1762,8 @@ Both must be numbers or markers.") #else f1 = drem (f1, f2); #endif - if (f1 < 0) + /* If the "remainder" comes out with the wrong sign, fix it. */ + if ((f1 < 0) != (f2 < 0)) f1 += f2; return (make_float (f1)); } -- 2.30.2